import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css'
// 这里使用了 lib-flexble 进行 rem 移动端适配
import 'amfe-flexible'
// 引入样式清除包
import 'reset-css'
import './assets/style/base.less'
import './assets/style/icon/iconfont.css'
import Qs from 'qs'
import request from './utils/request'
import Utils from './utils'
import CommonUI from './components/common/common-ui'

request.defaults.baseURL = Utils.api
Vue.prototype.$http = request
Vue.prototype.$qs = Qs
// 定义过滤器
Vue.filter('RMBformat', val => {
  return '￥' + Number(val).toFixed(2) + '元'
})

Vue.use(Vant)
Vue.use(CommonUI)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
